package com.day1909d_xiangmu.weinfo.presenter;


import com.day1909d_xiangmu.weinfo.base.BasePresenter;
import com.day1909d_xiangmu.weinfo.bean.DailyNewsBean;
import com.day1909d_xiangmu.weinfo.net.ResultCallBack;
import com.day1909d_xiangmu.weinfo.model.DailyNewsModel;
import com.day1909d_xiangmu.weinfo.view.DailyNewsView;

public class DailyNewsPresenter extends BasePresenter<DailyNewsView> {

    private DailyNewsModel model;

    @Override
    protected void initModel() {
        model = new DailyNewsModel();
        addModel(model);
    }

    public void getLastesNews() {
        model.getLatestNews(new ResultCallBack<DailyNewsBean>() {
            @Override
            public void onSuccess(DailyNewsBean dailyNewsBean) {
                view.setData(dailyNewsBean);
            }

            @Override
            public void onFail(String msg) {

            }
        });
    }
}

